<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../common/taglibs.jsp"%>
<%@ include file="RolePowerManager.jsp"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
   <link rel="stylesheet" href="${ctx}/css/common.css" type="text/css"></link>
  <link rel="stylesheet" href="${ctx}/css/reset.css" type="text/css"></link>
  <script type="text/javascript" src="${ctx}/js/jquery-1.8.1.js"></script>
  <script type="text/javascript" src="${ctx}/js/jquery.easydrag.handler.beta2.js"></script>
  <script type="text/javascript" src="${ctx}/js/My97DatePicker/WdatePicker.js"></script>
  <script type='text/javascript' src='${ctx}/dwr/interface/DossierManagerService.js'></script>
  <script type="text/javascript" src="${ctx}/js/Dossier/DossierManager.js"></script>
  <script type='text/javascript' src='${ctx}/dwr/engine.js'></script>
  <script type='text/javascript' src='${ctx}/dwr/util.js'></script>
  <SCRIPT type=text/javascript>
    var clock = new Clock();
    clock.display(document.getElementById("clock"));
  </SCRIPT>

  </head>
  
  <body>
    <TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
		<TR height=28>
			<TD background=${ctx}/images/title_bg1.jpg style="FONT-SIZE: 12px;">
				当前位置:人员档案管理 >> 员工档案管理
			</TD>
		</TR>
		<TR>
			<TD bgColor=#b1ceef height=1></TD>
		</TR>
		<TR height=20>
			<TD background=${ctx}/images/shadow_bg.jpg></TD>
		</TR>
	</TABLE>
	<form action="GetDossierServlet" method="post" id="searchform">
	  <div class="query" >
	  <div class="querytype">
	  	<label>查询条件：</label>
	  	<select class="queryselect" name="searchtype" id="searchtype">
			<option value="dosno">
			档案编号
			</option>
			<option value="empid">
			人员编号
			</option>
			<option value="dosname">
			档案名称
			</option>
		</select>
		<input class="queryinput" type="text" name="keycode" id="keycode"/>
	  </div>
	  <div class="querytime">
	  	<div class="selecttime">
	  	</div>
	  	<div class="querybtn">
	  		<span class="STYLE1"><img src="${ctx}/images/a1.gif" width="9" height="9" /></span>
	  		<span class="STYLE1"> </span><a href="javaScript:search()" onclick="" style="cursor: pointer;">查询</a><span class="STYLE1"></span>
	  	</div>
      </div>
      <div style="float: right; padding-right: 20px">
  			<span class="STYLE1"><img src="${ctx}/images/001.gif" width="9" height="9" /></span>
           	<span class="STYLE1"> </span><a href="javaScript:popupDiv('add_div')">新增</a><span class="STYLE1"></span>
	  	</div>
	  <div class="clear"></div>
	  </div>
	</form>
	  
    <div class="bottom" ></div>
    <div id="main">
      <table id="detail_t">
        <tr>
          <th>序号</th>
            <th>档案编号</th>
            <th>人员编号</th>
            <th>档案名称</th>
            <th>内容摘要</th>
            <th>备注</th>      
            <th>更多操作</th>
         </tr>
          
         <c:forEach items="${page.list}" var="t" varStatus="stat">
         <tr class="items">
          	<td>${stat.count}</td>
          	<td id="${stat.count}${1}">${t.dosno}</td>
          	<td id="${stat.count}${2}">${t.emp.empno}</td>
          	<td id="${stat.count}${3}">${t.name}</td>
          	<td id="${stat.count}${4}">${t.synopsis}</td>
          	<td id="${stat.count}${5}">${t.remark}</td>
			<td height="18" bgcolor="#FFFFFF">
			  <div align="center">
				<span class="STYLE1"><img src="${ctx}/images/037.gif"
					width="9" height="9" /> </span> <span class="STYLE1"> [</span><a
					href="javaScript:clickEditDossier('${stat.count}','${t.id}','edit_div')">编辑</a><span
					class="STYLE1">]</span> &nbsp;&nbsp;&nbsp; <span
					class="STYLE2"><img src="${ctx}/images/010.gif" width="9"
					height="9" /> </span> <span class="STYLE2"> </span><span
					class="STYLE1">[</span><a
					href="javaScript:deleteDossier('${t.id})'">删除</a><span
					class="STYLE1">]</span>
			  </div>
			</td>
		  </tr>
          </c:forEach>
          
        </table>
		<div class="manu">
			共${page.totalCount}条记录当前第<font color="#ff6600">${page.pageNo}/${page.pageCount}</font>页
			<a href="GetDossierServlet?pageNo=${1}">首页</a><a href="GetDossierServlet?pageNo=${page.pageNo-1}">上一页</a><a href="GetDossierServlet?pageNo=${page.pageNo+1}">下一页</a><a href="GetDossierServlet?pageNo=${page.pageCount}">末页
			</a>每页显示<input type="text" name="pageSize" id="pageSize" size="2" />条 
			<input type="submit" onclick="changePageSize()" value="提交" />
		</div>
	</div>
		<div id="edit_div" class="pop_box">
			<div class="p_head">
				<span class="p_h_title">员工详情</span>
				<span><a class="p_h_close" onclick="hideDiv('edit_div');"
					title="close">X</a> </span>
			</div>
			<div class="p_box_body" id="p_b_body">
								<div class="p_con">
					<table id="p_con_t">
						<tr>
							<td class="t1">
								档案编号：
							</td>
							<td>
								<div class="txt-fld">
									<input id="dosno_edit" type="text" />
								</div>
							</td>
						</tr>
						<tr>
							<td class="t1">
								人员编号：
							</td>
							<td>
								<div class="txt-fld">
									<input id="empid_edit" type="text" />
								</div>
							</td>
						</tr>
						<tr>
							<td class="t1">
								档案名称：
							</td>
							<td>
								<div class="txt-fld">
									<input id="dosname_edit" type="text" />
								</div>
							</td>
						</tr>
						<tr>
							<td class="t1">
								内容摘要：
							</td>
							<td>
								<div class="txt-fld">
									<input id="synopsis_edit" type="text" />
								</div>
							</td>
						</tr>
						<tr>
							<td class="t1">
								备注：
							</td>
							<td>
								<div class="txt-fld">
									<input id="remark_edit" type="text" />
								</div>
							</td>
						</tr>
						<tr>
							<td></td>
							<td>
								<input id="dossierid" style="visibility:hidden;width:0;height:0;"/>
								<input type="button" onclick="updateDossier()" value="提交" />
							</td>
						</tr>
					</table>
				</div>
			</div>
		</div>
		<div id="add_div" class="pop_box">
			<div class="p_head">
				<span class="p_h_title">新增员工履历</span>
				<span><a class="p_h_close" onclick="hideDiv('add_div');"title="close">X</a> </span>
			</div>
			<div class="p_box_body" id="p_b_body">
				<div class="p_con">
					<table id="p_con_t">
						
						<tr>
							<td class="t1">
								人员编号：
							</td>
							<td>
								<div class="txt-fld">
									<input id="empid_add" type="text" />
								</div>
							</td>
						</tr>
						<tr>
							<td class="t1">
								档案名称：
							</td>
							<td>
								<div class="txt-fld">
									<input id="dosname_add" type="text" />
								</div>
							</td>
						</tr>
						<tr>
							<td class="t1">
								内容摘要：
							</td>
							<td>
								<div class="txt-fld">
									<input id="synopsis_add" type="text" />
								</div>
							</td>
						</tr>
						<tr>
							<td class="t1">
								备注：
							</td>
							<td>
								<div class="txt-fld">
									<input id="remark_add" type="text" />
								</div>
							</td>
						</tr>
						<tr>
							<td></td>
							<td>
								<input type="button" value="提交" onclick="addDossier();"/>
							</td>
						</tr>
					</table>
				</div>
			</div>
		</div>
  </body>
</html>
